package org.zxp.designpattern.iterator;

import java.util.Iterator;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-08-29 11:55
 **/
public class TestIterator {
    public static void main(String[] args){
        MyBookStore myBookStore = new MyBookStore();
        myBookStore.iterator().forEachRemaining(o -> System.out.println(o));
        System.out.println("====");
        Iterator iterator = myBookStore.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
